package com.boliq.lol.adapter;


import com.boliq.lol.R;
import com.boliq.lol.bean.NewsBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

/**
 * <pre>
 * ================================================
 * 作者: BLQ_SSNB
 * 日期：2021/3/4
 * 邮箱: blq_ssnb@outlook.com
 * 修改次数: 1
 * 描述:
 *      添加描述
 * ================================================
 * </pre>
 */
public class NewsAdapter extends BaseQuickAdapter<NewsBean, BaseViewHolder> {
    public NewsAdapter() {
        super(R.layout.item_news);

    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, NewsBean newsBean) {
        baseViewHolder.setText(R.id.tv_index, String.valueOf(baseViewHolder.getAdapterPosition()));
        baseViewHolder.setText(R.id.tv_news_title, newsBean.getTitle());
//        baseViewHolder.setText(R.id.tv_hot, newsBean.getHot() + " 万热度");
//        英雄联盟赛事官方
        baseViewHolder.setText(R.id.tv_hot, "  英雄联盟赛事官方");
        baseViewHolder.setImageResource(R.id.img_cover, newsBean.getDrawable());

    }
}
